package org.vectrics.provider;

import org.vectrics.cms.ContentHelper;
import org.vectrics.common.db.NotesService;
import org.vectrics.common.db.SurrogateKeyService;
import org.vectrics.common.html.email.HtmlEmailHelper;
import org.vectrics.common.util.DateFormats;
import org.vectrics.company.CompanyService;
import org.vectrics.config.ApplicationConfiguration;
import org.vectrics.event.EventService;
import org.vectrics.location.LocationService;
import org.vectrics.mail.EmailTemplate;
import org.vectrics.project.task.ProjectService;
import org.vectrics.struts.PhraseProvider;
import org.vectrics.system.SystemService;
import org.vectrics.user.PersonSearchCriteria;
import org.vectrics.user.PersonSearcher;
import org.vectrics.user.PersonService;
import org.vectrics.user.UserAuthService;

import com.hexacta.hrs.services.employee.EmployeeService;
import com.hexacta.hrs.services.security.SecurityService;
import com.hexacta.hrs.services.securitygroups.SecurityGroupService;
import com.hexacta.hrs.services.staffing.EmployeeAssignmentService;
import com.hexacta.hrs.services.user.UserService;

/**
 * @author mmoore
 */
public class CoreServiceLocator extends ServiceLocator {

    public static EmailTemplate getSendPasswordEmailTemplate() {
        return (EmailTemplate) findServiceBean("email.template.send.password");
    }

    public static EmailTemplate getEventEmailTemplate() {
        return (EmailTemplate) findServiceBean("email.template.event.notification");
    }

    public static ContentHelper getContentHelper() {
        return (ContentHelper) findServiceBean("cms.helper");
    }

    public static PersonSearchCriteria createPersonSearchCriteria() {
        return (PersonSearchCriteria) findServiceBean("person.search.criteria");
    }

    public static PersonSearcher getPersonSearcher() {
        return (PersonSearcher) findServiceBean("person.searcher");
    }

    public static EventService getEventService() {
        EventService provider = (EventService) findServiceBean("event.service");
        return provider;
    }

    public static PhraseProvider getPhraseProvider() {
        PhraseProvider provider = (PhraseProvider) findServiceBean("phrase.provider");
        return provider;
    }

    public static ApplicationConfiguration getConfiguration() {
        ApplicationConfiguration provider = (ApplicationConfiguration) findServiceBean("configuration");
        return provider;
    }

    public static DateFormats getDateFormat() {
        DateFormats provider = (DateFormats) findServiceBean("date.format");
        return provider;
    }

    public static PersonService getPersonService() {
        PersonService provider = (PersonService) findServiceBean("person.service");
        return provider;
    }

    public static ProjectService getProjectService() {
        ProjectService provider = (ProjectService) findServiceBean("project.service");
        return provider;
    }

    public static UserAuthService getUserAuthService() {
        UserAuthService provider = (UserAuthService) findServiceBean("user.auth.service");
        return provider;
    }

    public static LocationService getLocationService() {
        LocationService provider = (LocationService) findServiceBean("location.service");
        return provider;
    }

    public static CompanyService getCompanyService() {
        CompanyService provider = (CompanyService) findServiceBean("company.service");
        return provider;
    }

    public static SurrogateKeyService getSurrogateKeyService() {
        SurrogateKeyService service = (SurrogateKeyService) findServiceBean("surrogate.key.service");
        return service;
    }

    public static SystemService getSystemService() {
        SystemService service = (SystemService) findServiceBean("system.service");
        return service;
    }

    public static HtmlEmailHelper getHtmlEmailHelper() {
        HtmlEmailHelper service = (HtmlEmailHelper) findServiceBean("html.email.helper");
        return service;
    }

    public static NotesService getNotesService() {
        NotesService service = (NotesService) findServiceBean("notes.service");
        return service;
    }

    public static SecurityService getSecurityService() {
        SecurityService service = (SecurityService) findServiceBean("securityService");
        return service;
    }

    public static SecurityGroupService getSecurityGroupService() {
        SecurityGroupService service = (SecurityGroupService) findServiceBean("securityGroupsService");
        return service;
    }

    public static com.hexacta.hrs.services.person.PersonService getPersonsService() {
        com.hexacta.hrs.services.person.PersonService provider = (com.hexacta.hrs.services.person.PersonService) findServiceBean("personService");
        return provider;
    }

    public static UserService getUserService() {
        UserService service = (UserService) findServiceBean("userService");
        return service;
    }

    public static EmployeeService getEmployeeService() {
        EmployeeService service = (EmployeeService) findServiceBean("employeeService");
        return service;
    }

    public static EmployeeAssignmentService getEmployeeAssignmentService() {
        EmployeeAssignmentService service = (EmployeeAssignmentService) findServiceBean("employeeAssignmentService");
        return service;
    }
    
    public static com.hexacta.hrs.service.staffing.ProjectService getProjectServiceInterface() {
        com.hexacta.hrs.service.staffing.ProjectService service = (com.hexacta.hrs.service.staffing.ProjectService) findServiceBean("projectService");
        return service;
    }

}
